#@datagrid()
#define content_header()
<h1>
    角色分组
    <small>authrole tables</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
    <li><a href="#">管理员</a></li>
    <li class="active">角色分组</li>
</ol>
#end
#define content()
<div class="box">
    <div class="box-header">
        <div class="row">
            <div class="col-md-5">
                <button type="button" class="btn btn-sm btn-default navbar-btn xsui-btn-add-dialog" data-url="/authrole/edit" title="新增角色">新增</button>
                <button type="button" class="btn btn-sm btn-success navbar-btn xsui-btn-refresh">刷新</button>
            </div>
            <div class="col-md-7">
                <form class="navbar-form navbar-right">
                    <div class="form-group">
                        <input type="text" name="word" class="form-control input-sm" placeholder="关键词..." title="名称、代码" value="#(search_word??)" />
                    </div>
                    <button type="submit" class="btn btn-sm btn-default">搜索</button>
                </form>
            </div>
        </div>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <table class="xsui-datagrid table table-condensed table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th>#</th>
                    <th>名称</th>
                    <th>代码</th>
                    <th>排序</th>
                    <th>状态</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                #for(vo : listPage.getList())
                <tr class="treegrid-1" data-key="#(vo.id)">
                    <td class="xsui-rowid" title="#(vo.id)"></td>
                    <td title="#(vo.id)|#(vo.title)"><a href="/authrole/edit/#(vo.id)" class="xsui-btn-edit-dialog" title="编辑  - #(vo.title)">#(vo.title)</a></td>
                    <td>#(vo.code)</td>
                    <td class="xsui-cell-sort"><input type="text" value="#(vo.sort)" size="3" data-value="#(vo.sort)" data-url="/authrole/changeSort?id=#(vo.id)&sort=varsort" title="更改后,鼠标点击页面任意位置即可自动生效" /></td>
                    <td class="xsui-cell-status"><a href="/authrole/changeStatus?id=#(vo.id)&status=varstatus" data-value="#(vo.status)" title="点击隐藏" class="text-success"><i class="fa fa-check fa-fw"></i></a></td>
                    <td>#(vo.create_time)</td>
                    <td class="xsui-action-td">
                        <div class="btn-group">
                            <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" href="#">
                                操作
                                <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu pull-right" style="min-width: 60px">
                                <li><a href="/authrole/edit/#(vo.id)" class="xsui-btn-edit-dialog" title="编辑 - #(vo.title)"><span class="glyphicon glyphicon-edit"></span>编辑</a></li>
                                <li><a href="/authrole/rule_edit/#(vo.id)" class="xsui-btn-edit-dialog" title="权限设置 - #(vo.title)"><span class="glyphicon glyphicon-edit"></span>权限设置</a></li>
                                <li><a href="/authrole/doDelete/#(vo.id)" class="xsui-btn-delete" title="删除  - #(vo.title)"><span class="glyphicon glyphicon-remove"></span>删除</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
                #end
            </tbody>
        </table>
    </div>
    <!-- /.box-body -->
</div>
<!-- /.box -->
#end
#define script_before()
<script>
    // 2017-3-18
    $('.xsui-btn-process').click(function(){
        $.get($(this).data('url'),function(){
            alert('同步成功!');
        })
        return false;
    })
</script>
#end